class Test {
    constructor() {
        this.name = '111'
        this.num=1
    }
    getName() {
        ++this.num;
        if(this.num>3) return;
        this.getName();
        console.log(this.getName);
    }
    getAge() {
        return 18
    }
}
const tee=new Test();
tee.getName();